package com.hellowx_ssm.entity;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

import java.io.Serializable;

/**
 * Created by IntelliJ IDEA.
 *
 * @author MagicMushroom
 * @date 2021/6/24
 */
@Component
@PropertySource("classpath:/mybatis.properties")
public class MybatisProperties implements Serializable {
    @Value("${mybatis.driverClassName}")
    String driverClassName;
    @Value("${mybatis.url}")
    String url;
    @Value("${mybatis.username}")
    String username;
    @Value("${mybatis.password}")
    String password;
    @Value("${mybatis.typeAliasesPackage}")
    String typeAliasesPackage;
    @Value("${mybatis.mapperLocations}")
    String mapperLocations;

    public String getDriverClassName() {
        return driverClassName;
    }

    public void setDriverClassName(String driverClassName) {
        this.driverClassName = driverClassName;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getMapperLocations() {
        return mapperLocations;
    }

    public void setMapperLocations(String mapperLocations) {
        this.mapperLocations = mapperLocations;
    }

    public String getTypeAliasesPackage() {
        return typeAliasesPackage;
    }

    public void setTypeAliasesPackage(String typeAliasesPackage) {
        this.typeAliasesPackage = typeAliasesPackage;
    }

    @Override
    public String toString() {
        return "MybatisProperties{" +
                "driverClassName='" + driverClassName + '\'' +
                ", url='" + url + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", typeAliasesPackage='" + typeAliasesPackage + '\'' +
                ", mapperLocations='" + mapperLocations + '\'' +
                '}';
    }
}
